class Pointer():
    def __init__(self, x, y):
        self.x = x
        self.y = y

class Rectangle():
    def __init__(self,point, width, height):
        self.point = point
        self.width = width
        self.height = height

    def area(self):
        return self.width * self.height

    def judge(self,one_pointer):
        right = self.point.x + self.width
        bottom = self.point.y - self.height
        left = self.point.x
        top = self.point.y
        a = (left <= one_pointer.x <= right) and (bottom <= one_pointer.y <= top)
        return a

p1 = Pointer(10, 20)
p2 = Pointer(30, 40)
s1 = Rectangle(p1, 30, 30)
print(s1.area())
print(s1.judge(p2))

